/**
 * DWR Tree
 * @author liuhz
 */
CQCIS.tree.DWRTree = Ext.extend(Ext.tree.TreePanel, {
    /**
     * @cfg root  {Ext.tree.AsyncTreeNode}
     */
    /**
     * @cfg loader {CQCIS.tree.DWRTreeLoader}
     * <pre>
     * dwrCall
     * params
     * nodeMeta
     * </pre>
     */
    initComponent: function(){
        if (this.loader && !(this.loader instanceof CQCIS.tree.DWRTreeLoader)) {
            this.loader = new CQCIS.tree.DWRTreeLoader(this.loader);
        }
        if (!this.root && this.rootId) {
            this.root = new Ext.tree.AsyncTreeNode({
                //draggable : false,
                expandable: true,
                expanded: true,
                text: this.rootText ? this.rootText : '根节点',
                id: this.rootId
            });
        }
        
        CQCIS.tree.DWRTree.superclass.initComponent.call(this);
    }
});
